package com.xry.healthy.service.impl;

import com.xry.common.core.domain.R;
import com.xry.healthy.entity.QhMedicalData;
import com.xry.healthy.enums.HealthyTypeEnum;
import com.xry.healthy.mapper.RestorativesMapper;
import com.xry.healthy.service.RestorativesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：ypc
 * @Date：2023/9/30
 * @Description：
 */
@Service
public class RestorativesServiceImpl implements RestorativesService {
    @Autowired
    public RestorativesMapper restorativesMapper;

    @Override
    public R restoratives() {
        List<QhMedicalData> list=restorativesMapper.restoratives(HealthyTypeEnum.RESTORATIVES.getValue());
        return R.ok(list);
    }

    @Override
    public R medicine(Long id) {
        List<QhMedicalData> list=restorativesMapper.medicine(id);
        return R.ok(list);
    }

    @Override
    public R medicineInfo(Long id) {
        QhMedicalData info=restorativesMapper.info(id);
        return R.ok(info);
    }
}
